package STUDENT.TRANBANGTUNG.day05_20_2016.xacdinhdiem;

public class Model {

	public double timdiemyeu(Object obj) {
		double[] array = obj.getArray();
		double demso = 0;
		for (int i = 0; i < 100; i++) {
			if (array[i] > 0 && array[i] <= 4) {
				demso++;
			}
		}
		return demso;
	}

	public double timdiemtrungbinh(Object obj) {
		double[] array = obj.getArray();
		double demso = 0;
		for (int i = 0; i < 100; i++) {
			if (array[i] >= 5 && array[i] <= 6) {
				demso++;
			}
		}
		return demso;
	}

	public double timdiemkha(Object obj) {
		double[] array = obj.getArray();
		double demso = 0;
		for (int i = 0; i < 100; i++) {
			if (array[i] >= 7 && array[i] <= 8) {
				demso++;
			}
		}
		return demso;
	}

	public double timdiemgioi(Object obj) {
		double[] array = obj.getArray();
		double demso = 0;
		for (int i = 0; i < 100; i++) {
			if (array[i] >= 9 && array[i] <= 10) {
				demso++;
			}
		}
		return demso;
	}
}
